package Test;

public class Test3 {
    public static void main(String[] args) {
        int[] arr = {1,2,3,64,5,6,7,8,9,10};
        int a = mac(arr);
        System.out.println("数组中的最大值为"+a);

    }
    public static int mac(int[] arr){
        int max = arr[0];
        for(int i = 1;i < arr.length; i++){
            if(max < arr[i]){
                 max = arr[i];
            }
        }
        return max;
    }
}
